const { defineConfig } = require('@vue/cli-service');
module.exports = defineConfig({
  transpileDependencies: true,
  chainWebpack: config => {
    config.module
        .rule('csv')
        .test(/\.csv$/)
        .use('csv-loader')
        .loader('csv-loader')
        .end();
  },
  devServer: {
    proxy: {
      '/api': {
        target: 'http://192.168.123.12:5000',  // Flask 服务器的局域网地址
        changeOrigin: true,
        pathRewrite: {
          '^/api': '/api'
        }
      }
    }
  }
});
